﻿<%@ Page Title="ThongTinCaNhan" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="ThongTinCaNhan.aspx.cs" Inherits="LayoutTemplate.ThongTinCaNhan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<style type="text/css">
    .newStyle1 {
	width: 150px;
	height: 407px;
	float: left;
}
.newStyle2 {
	width: 300px;
	height: 70px;
	float: left;
}
.newStyle3 {
	width: 100px;
	height: 70px;
	float: left;
}
.newStyle4 {
	float: right;
	width: 400px;
	height: 409px;
}
</style>
	<div style="width: 750px; float: left;">
	<div style="float:left; width:200px"><asp:Menu runat="server" id="Menu1">
	<Items>
		<asp:menuitem NavigateUrl="ThongTinCaNhan.aspx" Text="Thông tin cá nhân" Value="Thông tin cá nhân">
		</asp:menuitem>
		<asp:menuitem NavigateUrl="TinhTrangDonHang.aspx" Text="Tình trạng đơn hàng" Value="Tình trạng đơn hàng">
		</asp:menuitem>
		<asp:menuitem NavigateUrl="~/LichSuMuaHang.aspx" 
            Text="Lịch sử mua hàng" Value="Lịch sử mua hàng">
		</asp:menuitem>
	</Items>
	</asp:Menu></div>
<%  
    
    if (Session["ID"].ToString() == "")
        Response.Redirect("TrangLoi.aspx?Error=2");
    else
    {
        string tendangnhap = Session["TenDangNhap"].ToString();
        DAO_DTO_WS.DTO.ThanhVienDTO thanhvien = new DAO_DTO_WS.DTO.ThanhVienDTO();
        thanhvien = DAO_DTO_WS.DAO.ThanhVienDAO.LayThanhVien(tendangnhap);
        lbHoTen.Text = thanhvien.HoTen;
        lbNgaySinh.Text = thanhvien.NgaySinh.ToShortDateString();
        lbDienThoai.Text = thanhvien.DienThoai;
       
        lbNoiO.Text = thanhvien.NoiO;
        tbDienThoai.Text = "";
        tbHoTen.Text = "";
        tbNgaySinh.Text = "";
       
        tbNoiO.Text = "";
    }
 %>
		<div class="newStyle1">
			<div>
				<asp:Label runat="server" Text="Họ tên" id="Label1" CssClass="newStyle3"></asp:Label></div>
			<div>
				<asp:Label runat="server" Text="Ngày sinh" id="Label3" CssClass="newStyle3"></asp:Label></div>
			<div>
				<asp:Label runat="server" Text="Điện thoại" id="Label4" CssClass="newStyle3"></asp:Label></div>
			<div>
				<asp:Label runat="server" Text="Nơi ở" id="Label5" CssClass="newStyle3"></asp:Label></div>
			<div>
				<asp:Label runat="server" Text="Mật khẩu mới" id="Label6" CssClass="newStyle3"></asp:Label></div>
			<div>
				</div>
		</div>
		<div class="newStyle4">
			<div class="newStyle2">
			<asp:TextBox runat="server" id="tbHoTen"></asp:TextBox>
				<div><asp:Label id="lbHoTen" runat="server" ></asp:Label></div>
			</div>
			
			<div class="newStyle2">
				<asp:TextBox runat="server" id="tbNgaySinh"></asp:TextBox>
				<div><asp:Label id="lbNgaySinh" runat="server" ></asp:Label></div>
			</div>
			
			<div class="newStyle2">
			    <asp:TextBox runat="server" id="tbDienThoai"></asp:TextBox>
				<div><asp:Label id="lbDienThoai" runat="server" ></asp:Label></div>
			</div>
			
			<div class="newStyle2">
				<asp:TextBox runat="server" id="tbNoiO"></asp:TextBox>
				<div><asp:Label id="lbNoiO" runat="server" ></asp:Label></div>
			</div>
			<div class="newStyle2">
				<div>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl="~/CapNhatMatKhauaspx.aspx">Cập nhật mật khẩu</asp:HyperLink>
                </div>
			</div>
		</div>
			<div style="float:right;width:50%"><asp:Button id="btnCapNhat" runat="server" 
                    Text="Cap nhat" onclick="btnCapNhat_Click" /></div>
	</div>

</asp:Content>